package com.kaifamiao.service.impl;

import com.kaifamiao.dao.CustomerDAO;
import com.kaifamiao.entity.Customer;
import com.kaifamiao.service.CustomerService;

public class CustomerServiceImpl implements CustomerService {

    private CustomerDAO customerDao;

    @Override
    public boolean save(Customer c) {
        int count = customerDao.persist( c );
        return count == 1;
    }

    public CustomerDAO getCustomerDao() {
        return customerDao;
    }

    public void setCustomerDao(CustomerDAO customerDao) {
        this.customerDao = customerDao;
    }

}
